FROM centos
MAINTAINER zipingfang<768449566@qq.com>
#ENV MYPATH /usr/local
#WORKDIR $MYPATH
#
#RUN yum -y install vim
#RUN yum -y install net-tools
#
#EXPOSE 80
#CMD echo $MYPATH
#CMD echo "---end---"
#CMD /bin/bash
#
## docker build -f 文件路径 -t 镜像名:[tag] . docker build -f DockerfileDemo -t zipblogserver .
## docker run -it mycenots:0.1
#ENTRYPOINT ["ls","-a"]
COPY README.md /usr/local/README.md
ADD OpenJDK8U-jdk_x64_linux_openj9_linuxXL_8u282b08_openj9-0.24.0.tar.gz /usr/local
ADD apache-tomcat-8.5.78.tar.gz /usr/local

#RUN yum -y install vim
ENV MYPATH /usr/local
WORKDIR $MYPATH
ENV JAVA_HOME /usr/local/jdk8u282-b08
ENV CLASSPATH $JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
ENV CATALINA_HOME /usr/local/apache-tomcat-8.5.78
ENV CATALINA_BASH /usr/local/apache-tomcat-8.5.78
ENV PATH $PATH:$JAVA_HOME/bin:$CATALINA_HOME/lib:$CATALINA_HOME/bin

EXPOSE 8080

CMD cd /usr/local/apache-tomcat-8.5.78/bin && chmod u+x *.sh  && /usr/local/apache-tomcat-8.5.78/bin/startup.sh && tail -F /usr/local/apache-tomcat-8.5.78/logs/catalina.out

# docker run -d -p 9090:8080 --name zipingtomcat -v /home/ziping/build/tomcat/test:/usr/local/apache-tomcat-8.5.78/webapps/test -v /home/ziping/build/tomcat/tomcatlogs:/usr/local/apache-tomcat-8.5.78/logs diytomcat


# docker run -d -p 8090:8090 --name zipblog zipblogserver

# docker login -u 919496 or docker login -p fzp960815

# docker tag 镜像id 标记名 919496/zipblogserve:1.0 docker tag b9dc69ba127b 919496/zipblogserve:1.0
# docker push 919496/zipblogserve:1.0 docker tag 074092bbcdca 919496/zipblog:1.0
#docker push 919496/zipblog:1.0

#cd /zipBlog/zip-blog-nuxt && git pull && docker stop zipmysql02 && docker stop nuxt && docker build -f Dockerfile -t zipblog-nuxt . && docker run -p 3000:8091 --name nuxt -d --rm zipblog-nuxt && docker start zipmysql02

#cd /zipBlog/zipBlogServer && git pull  && mvn package -DskipTests && cd  /zipBlog/zipBlogServer/docker_config  && docker build -f DockerfileDemo -t zipblogserver . && docker run -d -p 8090:8090 --name zipblog zipblogserver
